package com.yiyuan.app.entity.enums;

/**
 * @Author: sunxuzong
 * @Date: 2024/07/19
 */
public enum ArticleTypeEnum {
    service("1","服务协议"),
    privacy("2","隐私协议"),
    invite("3","邀请规则"),
    pine("4","松树规则"),
    push_coins("5","推币机规则"),
    arcade_machine("6","街机规则"),
    recreation("7","娱乐规则"),
    vip("8","会员说明"),
    occupy("9","畅玩规则"),
    auto("10","挂机规则"),
    attention("100","注意事项"),
    notice("101","系统公告")
    ;

    private String code;

    private String desc;

    ArticleTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static ArticleTypeEnum getByCode(String code){
        for (ArticleTypeEnum enums : ArticleTypeEnum.values()){
            if (enums.getCode().equals(code)){
                return enums;
            }
        }
        return  null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
